package com.nuanshui.heatedloan.credit.pay.execute;

import com.nuanshui.framework.springContext.SpringContextUtil;
import com.nuanshui.heatedloan.credit.pay.PayContext;
import com.nuanshui.heatedloan.credit.pay.PayRequest;
import com.nuanshui.heatedloan.credit.pay.behavior.PayBehavior;
import com.nuanshui.heatedloan.credit.pay.constant.PayBehaviorType;
import org.springframework.stereotype.Service;

@Service
public class PayExecuteFacade extends OrderEntityContainer<PayBehaviorWrapper> {

    public void execute() {
        boolean bError=false;

        for (PayBehaviorWrapper item : filters) {

            item.getTarget().doInvoke();

            bError = PayContext.getContext().hasError();
            if (bError) {
                break;
            }
        }
    }
}
